package cn.javaeye.lonlysky.lforum.web;

import java.util.List;

import org.apache.struts2.config.ParentPackage;

import cn.javaeye.lonlysky.lforum.ForumBaseAction;
import cn.javaeye.lonlysky.lforum.entity.web.FartherType;
import cn.javaeye.lonlysky.lforum.entity.web.Info;
import cn.javaeye.lonlysky.lforum.entity.web.ParentType;
import cn.javaeye.lonlysky.lforum.service.FartherTypeManager;
import cn.javaeye.lonlysky.lforum.service.InfoManager;
import cn.javaeye.lonlysky.lforum.service.ParentTypeManager;

@ParentPackage("default")
public class IndexInfoAction extends ForumBaseAction {
	/**
	 * 
	 */
	private static final long serialVersionUID = 4392804005921426713L;
	private FartherType fartherType;
	private ParentType parentType;
	private FartherTypeManager fartherTypeManager;
	private ParentTypeManager parentTypeManager;
	private InfoManager infoManager;
	private List<ParentType> parentTypeList;
	private List<Info> infoList;
	@Override
	public String execute()  {
		
		parentType=parentTypeManager.get(parentType.getId());
		parentTypeList=parentTypeManager.findByFid(parentType.getFartherType().getId());
		infoList=infoManager.findAllParent(parentType.getId());
		return SUCCESS;
	}
	public FartherType getFartherType() {
		return fartherType;
	}
	public List<ParentType> getParentTypeList() {
		return parentTypeList;
	}
	public void setParentTypeList(List<ParentType> parentTypeList) {
		this.parentTypeList = parentTypeList;
	}
	public void setFartherType(FartherType fartherType) {
		this.fartherType = fartherType;
	}
	public ParentType getParentType() {
		return parentType;
	}
	public void setParentType(ParentType parentType) {
		this.parentType = parentType;
	}
	public FartherTypeManager getFartherTypeManager() {
		return fartherTypeManager;
	}
	public void setFartherTypeManager(FartherTypeManager fartherTypeManager) {
		this.fartherTypeManager = fartherTypeManager;
	}
	public ParentTypeManager getParentTypeManager() {
		return parentTypeManager;
	}
	public void setParentTypeManager(ParentTypeManager parentTypeManager) {
		this.parentTypeManager = parentTypeManager;
	}
	public InfoManager getInfoManager() {
		return infoManager;
	}
	public void setInfoManager(InfoManager infoManager) {
		this.infoManager = infoManager;
	}
	public List<Info> getInfoList() {
		return infoList;
	}
	public void setInfoList(List<Info> infoList) {
		this.infoList = infoList;
	}
	
}
